package com.lihepeng.leecode.open_source_test.jrule;

import org.jeasy.rules.annotation.Fact;
import org.jeasy.rules.annotation.Rule;
import org.jeasy.rules.api.Facts;
import org.jeasy.rules.api.Rules;
import org.jeasy.rules.api.RulesEngine;
import org.jeasy.rules.core.DefaultRulesEngine;
import org.jeasy.rules.core.RuleBuilder;
import org.junit.Test;

public class TestRuleRunner {
    @Test
    public void takeRain(){
        Facts facts = new Facts();
        // 显示
        facts.put("rain",false);
        Rules rules = new Rules();
        rules.register(new WeatherRule());
        RulesEngine rulesEngine = new DefaultRulesEngine();
        rulesEngine.fire(rules,facts);


    }
}
